


<div class="ui-bar  ui-widget ui-widget-content ui-corner-all">
<a class="ui-button ui-widget-content  ui-state-default ui-corner-all" href="<?php
            echo $this->url(
                array('module' => 'content',
                      'controller'=>'album',
                      'action'=>'add'),
                'default', true)
                ?>"
                ><?php echo  $this->translate('Add album'); ?></a>
</div>


<div class="ui-grid ui-widget ui-widget-content ui-corner-all">
<div class="ui-grid-header ui-widget-header ui-corner-top"><?php echo  $this->translate('Albums'); ?></div>
<table class="ui-grid-content ui-widget-content" >
<thead>
    <tr>
        <th class="ui-state-default"><?php echo $this->translate('Title'); ?></th>
        <th class="ui-state-default"><?php echo $this->translate('Created at'); ?></th>
        <th class="ui-state-default"><?php echo $this->translate('Edit'); ?></th>
    </tr>
</thead>
<tbody>
    <?php if(count($this->albums)): foreach($this->albums as $album):?>
    <tr>
        <td class="ui-widget-content"><?php echo $album['title']; ?></td>
        <td class="ui-widget-content"><?php echo $album['created_at']; ?></td>
        <td class="ui-widget-content">
            <a href="<?php
            echo $this->url(
                array('module' => 'content', 'controller'=>'album', 'action'=>'edit', 'album_id'=>$album['id']),
                'default', true)
                ?>"><?php echo $this->translate('Edit'); ?></a>

            <a href="<?php
            echo $this->url(
                array('module' => 'content', 'controller'=>'album', 'action'=>'delete', 'album_id'=>$album['id']),
                'default', true)
                ?>"><?php echo $this->translate('Delete'); ?></a>

        </td>
    </tr>
    <?php endforeach; else:  ?>
    <tr>
        <td class="ui-widget-content ui-grid-empty" colspan="3">
            <?php echo $this->translate('No albums'); ?>
        </td>
    </tr>
    <?php endif;?>
</tbody>
</table>
<div class="ui-grid-footer ui-widget-header ui-corner-bottom ui-helper-clearfix">
    
</div>
</div>


